gtkmountoperation: Support TCRYPT options when using proxy handler
authorsegfault <segfault@riseup.net>
Mon, 9 Jul 2018 19:13:50 +0000 (21:13 +0200)
committersegfault <segfault@riseup.net>
Thu, 18 Jul 2019 09:41:45 +0000 (11:41 +0200)
GMountOperation now supports options to unlock TCRYPT volumes. This
patch sets these options if they are returned by AskPassword() of a
GtkMountOperationHandlerProxy.

gtk/gtkmountoperation.c

index 3561bd2762812dd33d7528d692cc7a7d13d4ce71..2e72d4335cb0d2081582988bdb6830ee2b56b94e 100644 (file)
@@ -759,6 +759,12 @@ call_password_proxy_cb (GObject      *source,
         g_mount_operation_set_password (op, g_variant_get_string (value, NULL));
       else if (strcmp (key, "password_save") == 0)
         g_mount_operation_set_password_save (op, g_variant_get_uint32 (value));
+      else if (strcmp (key, "hidden_volume") == 0)
+        g_mount_operation_set_is_tcrypt_hidden_volume (op, g_variant_get_boolean (value));
+      else if (strcmp (key, "system_volume") == 0)
+        g_mount_operation_set_is_tcrypt_system_volume (op, g_variant_get_boolean (value));
+      else if (strcmp (key, "pim") == 0)
+        g_mount_operation_set_pim (op, g_variant_get_uint32 (value));
     }
 
  out: